var pnum = global('PNUM');
//定义post方法
function postHttp(url, data) 
{
    var xhr = new XMLHttpRequest();
    xhr.addEventListener("readystatechange", function () 
    {
        if (this.readyState === 4) {
            //flash(this.responseText);
            //显示返回消息,可删除本行
        }
    });
    xhr.open("POST", url, false);
    xhr.send(data);
    console.log(xhr.responseText)
    return xhr.responseText;
}
//定义get方法
function getHttp(url) 
{
    var xhr = new XMLHttpRequest();
    xhr.addEventListener("readystatechange", function () 
    {
        if (this.readyState === 4) {
            //flash(this.responseText);
            //显示返回消息,可删除本行
        }
    });
    xhr.open("GET", url, false);
    xhr.send();
    return xhr.responseText;
}


var content = "发件人: " + evtprm[1] + "n收件人: " + pnum + "n短信内容: " + evtprm[2];
var message = JSON.stringify(
{
        "content" : content
    });
var msgUrl = "http://192.168.2.51:8000/jd";
postHttp(msgUrl, message) 